package com.adaxi.adc.business.manager.controller;

import com.adaxi.adc.common.common.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 学员参考案例
 */
@RestController
@Api(tags = "学员参考案例[后台管理系统]接口", value = "ExampleController")
public class ExampleController {

    /**
     * 正确案例
     * @return
     */

    @GetMapping("/say-hello")
    @ApiOperation(value = "测试说你好", notes = "测试说你好")
    public CommonResult  sayHello(){
            return CommonResult.SUCCESS("Hello World  success i  am  manager");
    }

    /**
     * 正确案例
     * @return
     */
    @GetMapping("/say-error")
    @ApiOperation(value = "测试异常捕获", notes = "测试异常捕获")
    public CommonResult  sayError(){
        throw   new RuntimeException("Hello World error i  am  manager");
    }


}
